package org.nlp2rdf.navigator.benchmark.cli;

import org.dllearner.kb.sparql.SparqlQueryDescriptionConvertVisitor;
import org.nlp2rdf.navigator.benchmark.BenchmarkUtils;

import java.util.Arrays;
import java.util.List;

/**
 * Created by Claus Stadler
 * Date: Oct 25, 2010
 * Time: 12:42:31 PM
 */
public class RunGetQuery
{
    public static void main(String[] args)
        throws Exception
    {
        if(args.length != 1) {
            System.err.println("Please provide the KB-Syntax-String which should be converted to a Sparql query.");
            List<String> l = Arrays.asList(args);
            System.err.println("Arguments: (" + l.size() + ")" + l);
            System.exit(1);
        }

        String kbStr = args[0].replace('\'', '"');

        SparqlQueryDescriptionConvertVisitor visitor = new SparqlQueryDescriptionConvertVisitor();
        String result = visitor.getSparqlQuery(kbStr, 0, false, true);
        System.out.println(result);
    }
}
